package com.dd.consulprovider;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import springfox.documentation.annotations.ApiIgnore;

@SpringBootApplication
@EnableDiscoveryClient
@RestController
public class ConsulProviderApplication {
	
	@Value("${from}")
	private String from;
	
	@ApiIgnore
    @RequestMapping("/")
    public String home() {
        return "hi ,I'm Consul Provider-1：" + from;
    }

	public static void main(String[] args) {
		SpringApplication.run(ConsulProviderApplication.class, args);
		System.out.println("服务已经启动");
	}
}
